package com.lcredu.homework.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author 黎长容
 * @date 2025-07-17 23:53
 */
@Repository
public class SellerDao {
    @Resource
    private JdbcTemplate jdbcTemplate;
    
    //商家赚钱
    public void updateMoney(Integer sellerId, Float money) {
        String sql = "update seller set money = money + ? where id = ?";
        jdbcTemplate.update(sql, money, sellerId);
    }
}
